
public class BasePlusCommissionEmployee extends CommissionEmployee
{
	
	private double baseSalary;
	
	public BasePlusCommissionEmployee(String first, String last, String ssn, double sales, double rate, double base)
	{
		super(first, last, ssn, sales, rate);
		
		setbaseSalary(base);
	}
	
	public void setbaseSalary(double base)
	{
		baseSalary = (base<0.0) ? 0.0 : base;
	}
	
	
	public double getbaseSalary()
	{
		return baseSalary;
	}
	
	@Override
	public double earnings()
	{
		return (getbaseSalary() + super.earnings() );
	}
	
	@Override
	
	public String toString()
	{
		String temp = "First Name: " + getfirstName() + "\n" + 
						"Last Name: " +  getlastName() + "\n" +
						 "SSN: " + getSsn() + "\n" +
						"Gross Sale: " + getgrossSale()+ "\n" +
						 "CommissionRate: " + getcommissionRate() + "\n" +
						 "Base Salary: " + getbaseSalary() + "\n" +
						 "Salary: " + earnings() + "\n";
						
		return temp;
	}
	
	
	
	
}

